//
//  SettingCell.swift
//  ShiZhe
//
//  Created by 陈卿伟 on 16/9/9.
//  Copyright © 2016年 陈卿伟. All rights reserved.
//

import UIKit

class SettingCell: UITableViewCell {
    var leftLabel:UILabel!
    var rightLabel:UILabel!
    var centerLabel:UILabel!//中间的提示label
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        leftLabel = UILabel()
        rightLabel = UILabel()
        centerLabel = UILabel()
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.selectionStyle = .None
        self.accessoryType = .DisclosureIndicator
        self.backgroundColor = UIColor.whiteColor()
        self.createLeftLabel()
        self.createRightLabel()
        self.createCenterLabel()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    //创建左边的label
    func createLeftLabel(){
        leftLabel.frame = CGRect(x: 25*SCALEW, y: 11*SCALEH, width: WidthAPP-50*SCALEW, height: 18*SCALEH)
        leftLabel.textAlignment = .Left
        leftLabel.textColor = UIColor.blackColor()
        leftLabel.font = BaseFunc.getCustomFont(13)
        self.addSubview(leftLabel)
    }
    
    //创建右边的label
    func createRightLabel(){
        rightLabel = UILabel(frame: CGRect(x: WidthAPP-34*SCALEW-200*SCALEW,y: 12*SCALEH,width: 200*SCALEW,height: 17*SCALEH))
        rightLabel.textAlignment = .Right
        rightLabel.textColor = Theme.BlueColor
        rightLabel.font = BaseFunc.getCustomFont(12)
        self.addSubview(rightLabel)
    }
    
    //创建中间的label
    func createCenterLabel(){
        centerLabel = UILabel(frame: CGRect(x: 97*SCALEW,y: 13*SCALEH,width: 200*SCALEW,height: 14*SCALEH))
        centerLabel.textAlignment = .Left
        centerLabel.textColor = Theme.GrayColor
        centerLabel.font = BaseFunc.getCustomFont(10)
        self.addSubview(centerLabel)
    }
}
